package com.gdssoft.pdaweb.service.deviceReg.impl;

import com.gdssoft.core.service.impl.BaseServiceImpl;
import com.gdssoft.pdaweb.dao.deviceReg.DeviceRegDao;
import com.gdssoft.pdaweb.model.deviceReg.DeviceReg;
import com.gdssoft.pdaweb.service.deviceReg.DeviceRegService;


public class DeviceRegServiceImpl extends BaseServiceImpl<DeviceReg> implements DeviceRegService{
    private DeviceRegDao dao;
	
	public DeviceRegServiceImpl(DeviceRegDao dao) {
		super(dao);
		this.dao=dao;
	}

	public boolean checkExists(String mac){
		DeviceReg deviceReg = dao.getByMac(mac);
		return (null!=deviceReg);
		
	}
	
	public boolean checkActivity(String mac){
		DeviceReg deviceReg = dao.getByMac(mac);
		return (null!=deviceReg && "9".equals(deviceReg.getStatus()));
		
	}
}
